package net.xi.dmhome.mapper;

import net.xi.dmhome.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import javax.websocket.server.PathParam;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jxhu
 * @since 2021-02-02
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT * from dm_user where username = #{username}")
    User selectByUsername(@PathParam("username") String name);

    @Select("SELECT * from dm_user where uuid = #{uuid}")
    User selectByUserUUid(@PathParam("uuid") String uuid);

    @Select("SELECT * from dm_user where email = #{email}")
    User selectByEmail(@PathParam("email") String email);

}
